package com.example.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
public class StudentController {
    //1. 得到日志对象
    //private static Logger logger= LoggerFactory.getLogger(StudentController.class);
    @RequestMapping("/hii")
    public String sayHello(){
        //2. 使用日志对象打印日志
        log.info("i am info");
        return "Hello,Spring Boot";
    }
}
